<template>
  <div id="app">
    <a-config-provider :locale="locale">
      <router-view :key="key" />
    </a-config-provider>
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  computed: {
    ...mapGetters(["lang"]),
    locale() {
      return this.$i18n.getLocaleMessage(this.lang).message.ant;
    }
  },
  data() {
    return {
      key: false
    };
  },
  provide() {
    return {
      $app: this
    };
  },
  methods: {
    reload() {
      this.key = true;
      this.$nextTick(() => {
        this.key = false;
      });
    }
  }
};
</script>
